package com.janko.springbootbase.designmode.observer.v3Observable;

/**
 * @Description 类文件说明
 * @Author nieyankang
 * @Version 1.0
 * @date {date} {time}
 */
public class Client {
    public static void main(String[] args) {
        Observer lisi=new Lisi();
        Observer lianpo=new Lianpo();

        //定义出韩非子
        HanFeiZi hanFeiZi = new HanFeiZi();

        //我们后人根据历史，描述这个场景，有三个人在观察韩非子
        hanFeiZi.addObserver(lisi);
        hanFeiZi.addObserver(lianpo);

        //然后这里我们看看韩非子在干什么
        hanFeiZi.haveBreakfast();
    }
}
